﻿@model IEnumerable<UmbracoMVCDemo.Models.Shared.NavigationItemModel>
<ul>
    @foreach (var navItem in Model)
    {
        var active = navItem.Active ? "class=active" : string.Empty;
        <li @active>
            <a href="@navItem.Url">@navItem.Name</a>
            @if (navItem.Active && navItem.Children.Any())
            {
                @Html.Partial("Partials/Shared/_MainNavigation", navItem.Children)
            }
        </li>
    }
</ul>
